﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WarehouseView.aspx.cs"
    Inherits="Acc.Manage.Report_SF_aspx.WarehouseView" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style>
        /* 货位不存在产品 */
        .divcss1
        {
            width: 100px;
            height: 50px;
            border: 1px;
            border-color: Red;
            font-size: xx-small;
            background-color: White;
        }
        /* 货位存在产品 */
        .divcss2
        {
            /*color: #6699FF;*/
            width: 100px;
            height: 50px;
            border: 1px;
            border-color: Red;
            font-size: xx-small;
            background-color: White;
        }
        /* 仓库行信息 */
        .divcss3
        {
            /*color: #6495ED;*/
            width: 1150px;
            height: 50px;
            font-size: smaller;
        }
        /* 货位存在产品_单机改变北京颜色 */
        .divcss4
        {
            width: 100px;
            height: 50px;
            border: 1px;
            border-color: Red;
            font-size: xx-small;
            background-color: #CCCCCC;
        }
    </style>
    <script language="javascript" type="text/javascript">
        var strYid = "";
        //单击弹出货位产品信息
        function click_a(divDisplay) {
            //第一次点击背景颜色改变
            if (strYid.toString() != "") {
                //判断该元素是否存在
                if (document.getElementById(strYid)) {
                    document.getElementById(strYid).className = "divcss2";
                }
            }
            document.getElementById(divDisplay).className = "divcss4";
            strYid = divDisplay;
            PageMethods.GetWarehouseItems(divDisplay, click_a_success, click_a_error);
        }
        //click_a返回成功
        function click_a_success(result) {
            //alert(result);
            //out.println(result);
            var dd = document.getElementById('HuoWeiItem');
            dd.innerHTML = result;
        }
        //click_a失败返回
        function click_a_error() {
            alert("异常！");
        }
        //点击仓库显示或隐藏仓库信息
        function click_b(divDisplay) {
            PageMethods.GetWarehouseHangItems(divDisplay, click_b_success, click_b_error);
        }
        //click_b返回成功
        function click_b_success(result) {
            var dd = document.getElementById('div_1');
            dd.innerHTML = result;
        }
        //click_b失败返回
        function click_b_error() {
            alert("异常！");
        }
        //查看行下面货位信息
        function change(strHangCode) {
            document.getElementById('tb').style.visibility = "visible";
            PageMethods.GetWarehouseView(strHangCode, success, error);
            document.getElementById('hanghao').innerHTML = document.getElementById(strHangCode).innerHTML;
        }
        //change成功返回
        function success(result) {
            var dd = document.getElementById('tb');
            dd.innerHTML = result;
        }
        //change失败返回
        function error() {
            alert("异常！");
        } 
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
    </asp:ScriptManager>
    <div>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a onclick="return click_b('1')" style="cursor: pointer;">
            一号仓库</a>&nbsp;&nbsp; <a onclick="return click_b('2')" style="cursor: pointer;">二号仓库</a>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <label id="hanghao" title="" style="font-size: xx-large">
        </label>
        </br>
        <div style="height: 150px">
            <div id="div_1" class="divcss3" style="display: block">
            </div>
            </br> </br>
        </div>
        <div style="height: auto; width: 1000px; padding-left: 130px;">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <table border="1" bordercolor="#a0c6e5" style="border-collapse: collapse; visibility: hidden"
                id="tb">
                <tr>
                    <td>
                        请选择仓库！
                    </td>
                </tr>
            </table>
        </div>
        &nbsp;&nbsp;
        <div style="height: auto; width: 1000px; padding-left: 130px;">
            <label id="HuoWeiItem" title="">
            </label>
        </div>
    </div>
    </form>
</body>
</html>
